'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert('Users', [
      {
        username: 'admin',
        password: '123456',
        email:"admin:@qq.com",
        nickname:"管理员",
        sex:1,
        role:1,
        avatar:'',
        introduction:'我是管理员',
        company:'白马公司',
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        username: '普通用户1',
        password: '123456',
        email:"user1:@qq.com",
        nickname:"普通用户1",
        sex:1,
        role:1,
        avatar:'',
        introduction:'我是普通用户',
        company:'白马公司',
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        username: '普通用户2',
        password: '123456',
        email:"user2:@qq.com",
        nickname:"普通用户2",
        sex:1,
        role:1,
        avatar:'',
        introduction:'我是普通用户2',
        company:'白马公司',
        createdAt: new Date(),
        updatedAt: new Date()
      },
    ], {});
  },

  async down (queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete('Users', null, {});
  }
};
